package day0414;

public class Test5 {
    public static int Max(int[] arr) {
        int max = 0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > arr[max]) {
                max = i;
            }
        }
        return max;
    }

    public static void main(String[] args) {
        int[] arr = {10, 20, 30, 40, 50, 60};
        int max = Max(arr);
        System.out.println("数组中最大元素的索引值是: " + max);
    }
}